package com.tz.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "ONLINE_CATEGORY")
public class Category implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2957941945384934662L;
	private Long cateId;
	private String cateName;
	public Category() {
		super();
	}
	public Category(String cateName) {
		super();
		this.cateName = cateName;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "category_id")
	@SequenceGenerator(name = "category_id", sequenceName = "online_category_id")
	public Long getCateId() {
		return cateId;
	}
	public void setCateId(Long cateId) {
		this.cateId = cateId;
	}
	
	@Column(nullable=false)
	public String getCateName() {
		return cateName;
	}
	public void setCateName(String cateName) {
		this.cateName = cateName;
	}
	@Override
	public String toString() {
		return "Category [cateId=" + cateId + ", cateName=" + cateName + "]";
	}
	
	
	
}
